import 'dart:ui';

import 'package:fish_redux/fish_redux.dart';
import 'package:www.znpigai.teacher/global_store/state.dart';
import 'package:www.znpigai.teacher/home_page/homework_list_component/item/state.dart';

import 'item/state.dart';

class HomeworkAnswerListState
    implements GlobalBaseState, Cloneable<HomeworkAnswerListState> {
  List<HomeworkAnswerState> items = <HomeworkAnswerState>[];
  HomeworkState homework;
  bool isLoading = false; // 是否正在请求数据中
  int pageIndex = GlobalState.firstPageIndex; // 页面索引
  int pageTotal = 1; // 页面总数
  int webPageProgress = 0;

  HomeworkAnswerListState();

  @override
  HomeworkAnswerListState clone() {
    return HomeworkAnswerListState()
      ..items = items
      ..homework = homework
      ..pageIndex = pageIndex
      ..pageTotal = pageTotal
      ..isLoading = isLoading
      ..webPageProgress = webPageProgress;
  }

  @override
  Color themeColor;

  @override
  Map<String, dynamic> userInfo;
}

HomeworkAnswerListState initState(HomeworkState arg) {
  return HomeworkAnswerListState()..homework = arg;
}
